package validate

import (
	"github.com/go-playground/validator/v10"
	"regexp"
)

func CustomFunc(fl validator.FieldLevel) bool {

	//string
	strVal := fl.Field().String()
	if matched,_ := regexp.MatchString(`\w{4,10}`,strVal);matched {
		return true
	}

	return false
}
